javascript regex check if string is empty

84

javascript regex check if string is empty -

function IsEmptyOrWhiteSpace(str) {
    return (str.match(/^\s*$/) || []).length > 0;
}

Comments

Submit
0 Comments